package Day2025_04_11;

import java.util.Scanner;

public class Demo03 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(), k = in.nextInt();
        long[] a = new long[n + k];
        long[] b = new long[n + k];
        for (int i = 1; i <= n; i++) {
            a[i] = in.nextLong();
        }
        for (int i = 1; i <= n; i++) {
            b[i] = in.nextLong();
        }
        long[] f = new long[n + 1];  // 好感
        long[] g = new long[n + 1];  // 耻辱
        for (int i = 1; i < k; i++) {
            f[0] += a[i];
            g[0] += b[i];
        }
        long[] ret = new long[2];
        long tmp = 0;
        for (int i = 1; i <= n; i++) {
            f[i] = f[i - 1] - a[i - 1] + a[i + k - 1];
            g[i] = g[i - 1] - b[i - 1] + b[i + k - 1];
            if (ret[0] < f[i]) {
                ret[0] = f[i];
                ret[1] = g[i];
                tmp = i;
            } else if (ret[0] == f[i] && ret[1] > g[i]) {
                ret[0] = f[i];
                ret[1] = g[i];
                tmp = i;
            }
        }
        System.out.println(tmp);
    }
}
